package com.leeon.container.example.queue;

import java.util.LinkedList;
import java.util.Queue;

import static net.mindview.util.Print.print;

class Command{

    private String name;

    public Command(String name){
        this.name = name;
    }

    public String operation(){
        return this.name;
    }
}

class  B{
    public Queue coco(Queue q,String name){
        Command co = new Command(name);
        q.offer(co);
        return q;
    }
}

public class Example25 {
    public static void main(String[] args){
        B b = new B();
        Queue<Command> q = new LinkedList<Command>();
        b.coco(q,"leeon");
        print(q.remove().operation());
    }


}
